<template>
	<AuthContainer>
		<template #default>
			<LoginRegister :mode = "currentMode" @toggleMode = "toggleForm" />
		</template>
	</AuthContainer>
</template>

<script lang = "ts" setup>
import { ref } from 'vue'
import AuthContainer from '@/components/auth/AuthContainer.vue'
import LoginRegister from '@/components/auth/LoginRegister.vue'

//* 当前表单模式
const currentMode = ref<'login' | 'register'>('login')

//* 切换表单模式 登录/注册
const toggleForm = () => (currentMode.value = currentMode.value === 'login' ? 'register' : 'login')

</script>

<style scoped>
</style>